function parseUrl(){
	var url=location.href
    if(url.indexOf("?") == -1) {
        return {};
    }
    var query = url.split("?")[1];
    var queryArr = query.split("&");
    var obj = {};
    queryArr.forEach(function(item){
        var key = item.split("=")[0];
        var value = item.split("=")[1];
        obj[key] = decodeURIComponent(value);
    });
    return obj;
}



function init(){
	var obj=parseUrl();
	$.ajax({
		url: 'https://www.supertimor.cn/media_project/index.php/externalTravel/totalSubsidy',
		method: 'post',
		header: 'Content-Type: application/x-www-form-urlencoded',
		async:false,
		data: {
			internet: obj.internet,
			country:obj.country,
			city:obj.city,
			day:obj.day
		},
		success: function(e) {
			console.log(e)
			$("#accommodation").text(e.result.accommodation)
			$("#day").text(e.result.day)
			$("#destination").text(e.result.destination)
			$("#food").text(e.result.food)
			$("#other").text(e.result.other)
			$("#total_subsidy").text(e.result.total_subsidy)
			$("#type").text(e.result.type)
		}
	})
}

init();
